<!--
 * @Description:
 * @Author:
 * @Date: 2024-10-26 14:04:48
 * @LastEditTime: 2024-10-27 22:25:55
 * @LastEditors: XXX
-->
<template>
  <div @click="toggleClick">
    <el-icon class="icon" :size="20">
      <Fold v-if="isActive"/>
      <Expand v-else/>
    </el-icon>
  </div>
</template>

<script setup lang="ts">
type Props = {
  isActive: Boolean
}
defineProps<Props>()

const emit = defineEmits<{
  (name: 'toggle-click'):void
}>()

const toggleClick = () => {
  emit('toggle-click')
}
</script>

<style lang="scss" scoped>
.icon {
  vertical-align: middle;
}
</style>
